$(function() {
	var id = getParameter("17-1.js", "id");

	$("#Button2").bind("click", function() {
				document.location = context + "/site/creditOrganization/16.jsp";
			})

	grooveTableSelector({
				id : id,
				tableName : "loanapply",
				handleType : "single",
				initFunc : function(data) {
					var auditView = new $.grooveView("addcreditcontract", {
								params : {
									applyId : id
								},
								submitMessage : "确定提交生成合同信息",
								OKMessage : "成功生成合同信息",
								submitButtonID : "Button1",
								formID : "formID",
								rendercall : function() {
									$("#FC_CUSTOMERNAME")
											.val(data.LA_CUSTOMERNAME);
									$("#FC_CUSTOMERID").val(data.LA_CUSTOMEID);
									$("#FC_CREDITNAME").val(data.LA_CREDITNAME);
									$("#FC_CREDITID").val(data.LA_CREDITID);
									$("#FC_FPNANE")
											.val(data.LA_LOANPRODUCTNAME);
									$("#FC_FPID").val(data.LA_LOANPRODUCTID);
									$("#FC_AMOUNT").val(data.LA_REPLYAMOUNT);
									$("#FC_CURRENCY").val(data.LA_CURRENCY);
									$("#FC_CURRENCYID").val(data.LA_CURRENCYID);
								},
								aftercall : function() {
									document.location = context
											+ "/site/creditOrganization/17.jsp";
								}
							});
				}
			});

	$("#pageloading").hide();
});